//
//  WordsDictData.h
//  KidReading
//
//  Created by telen on 14/12/31.
//  Copyright (c) 2014年 刘赞黄Telen. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "NetRequest.h"
#import "TLSoundPlayer.h"

@protocol WordsDictDataDelegate <NSObject>

@optional
- (void)wordsDictData_DidGetInfo:(NSDictionary*)infoDict forWords:(NSString*)words andPinyin:(NSString*)py;

- (void)wordsDictData_DidGetSound_forWords:(NSString*)words andPinyin:(NSString*)py;

- (void)wordsDictData_DidStartPlaySounds:(NSArray*)soundArr withSign:(NSString*)sign;
- (void)wordsDictData_DidFinishPlaySounds:(NSArray*)soundArr withSign:(NSString*)sign;

@end


@interface WordsDictData : NSObject<NetRequestDelegate,TLSoundPlayerDelegate>
{
    NSMutableDictionary* mDict;
    NSMutableArray* delegateArr;
}

+ (WordsDictData*) shareSingle;
- (void)setGetWordsDelegate:(id<WordsDictDataDelegate>)delgate_;
- (void)unSetGetWordsDelegate:(id<WordsDictDataDelegate>)delgate_;

- (void) getwordsInfo_bookID:(NSInteger)bookid bookOid:(NSInteger)bookOid words:(NSString*)words pinYin:(NSString*)py phrase:(NSArray*)phraseArr phraseIdx:(NSInteger)phraseIdx isEnglishWord:(BOOL)en;

- (void) playSounds:(NSArray*)soundArr withSign:(NSString*)sign;

- (NSString*)getDict_Lang;
- (void)setDict_Lang:(NSString*)lang;

@end
